/*    */ package com.feeyin.radar.sys.dao;
/*    */ 
/*    */ import com.feeyin.radar.commons.Page;
/*    */ import com.feeyin.radar.commons.StringUtils;
/*    */ import com.feeyin.radar.crm.dao.CustomerDAO;
/*    */ import com.feeyin.radar.crm.model.Customer;
/*    */ import java.io.PrintStream;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ import org.springframework.beans.factory.BeanFactory;
/*    */ import org.springframework.context.support.ClassPathXmlApplicationContext;
/*    */ 
/*    */ public class TestCustomerDAO
/*    */ {
/*    */   public static void main(String[] args)
/*    */   {
/* 22 */     ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(
/* 23 */       new String[] { "context/applicationContext.xml" });
/* 24 */     BeanFactory factory = appContext;
/*    */ 
/* 26 */     CustomerDAO customerDAO = (CustomerDAO)factory.getBean("customerDAO");
/* 27 */     DepartmentDAO departmentDAO = (DepartmentDAO)factory.getBean("departmentDAO");
/*    */ 
/* 36 */     String deptIds = departmentDAO.getCurrentDeptIdAndSubDeptIdsByDeptId(Integer.valueOf(1));
/* 37 */     Customer customer = new Customer();
/* 38 */     if (!StringUtils.isEmpty(deptIds)) {
/* 39 */       customer.setCustomerCategory("2");
/* 40 */       customer.setDeptIdsEx(deptIds);
/*    */     }
/*    */ 
/* 43 */     List customers = new ArrayList();
/* 44 */     Page page = new Page();
/* 45 */     page.setPageStartRow(0);
/* 46 */     page.setPageEndRow(50);
/* 47 */     customers = customerDAO.getPageCustomersByDynamic(customer, page);
/* 48 */     System.out.println(customers.size() + "-------------");
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.dao.TestCustomerDAO
 * JD-Core Version:    0.6.0
 */